package com.dhcc.bpm.common.launch;

import com.dhcc.bpm.common.constant.CommonConstant;
import org.springblade.core.boot.auto.service.AutoService;
import org.springblade.core.launch.service.LauncherService;
import org.springframework.boot.builder.SpringApplicationBuilder;

import java.util.Properties;

/**
 * @ClassName LauncherServiceImpl
 * @Description 启动参数拓展
 * @Author sjm
 * @Date 2020/2/21 0021 15:16
 * @Version V1.0
 * @Copyright: 2020 东华软件 . All rights reserved.
 **/
@AutoService(LauncherService.class)
public class LauncherServiceImpl implements LauncherService {

	/**
	 * @Description 启动参数扩展
	 * @Author xiafayu
	 * @Date 2020/2/24 19:55
	 * @param builder
	 * @param appName
	 * @param profile
	 * @return void
	 * @throws
	 **/
	@Override
	public void launcher(SpringApplicationBuilder builder, String appName, String profile) {
		Properties props = System.getProperties();
		props.setProperty("spring.cloud.sentinel.transport.dashboard", CommonConstant.sentinelAddr(profile));
	}

}
